#ifndef VIDEOVIEW_H
#define VIDEOVIEW_H

#include <QtGui/QWidget>
#include <Phonon/VideoWidget>
#include <Phonon/BackendCapabilities>
#include <Phonon/MediaObject>
#include <Phonon/VideoPlayer>
#include <QUrl>
#include <QFileDialog>
#include <QFileInfo>
#include <QDesktopServices>

namespace Ui
{
    class VideoView;
}

class VideoView : public QWidget
{
    Q_OBJECT

public:
    VideoView(QWidget *parent = 0);
    ~VideoView();

public slots:
    void play();
    void playNext();
    void playPrevious();
    void stop();
    void addFiles();
    void addFiles(QStringList);
    void setIndex(int);
    void setStopRecVisible(bool);
    void clear();
    void doneRecording();
    void setUser(QString);
    void webcamVideoDone();
    void startRecording();

private slots:
    void learnedThis(bool);

signals:
    void recordTo(QString);

private:
    void addList(QStringList);


    QString user;
    QStringList learnedPhrases;

    Ui::VideoView *ui;
    Phonon::MediaObject* mediaobject;
    Phonon::MediaObject* mediaobject4wc;
    QList<Phonon::MediaSource> sources;
    QStringList phrases;
    int index;
    int total;

};

#endif // VIDEOVIEW_H
